package com.gdpa.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gdpa.entity.BrokerBuilding;
import com.gdpa.entity.BrokerBuildingWithAreaName;
import com.gdpa.entity.SaleArea;
import com.gdpa.mapper.BrokerBuildingMapper;
import com.gdpa.service.IBrokerBuildingService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 经纪楼盘表 服务实现类
 * </p>
 *
 * @author zsr
 * @since 2018-12-19
 */
@Service
public class BrokerBuildingServiceImpl extends ServiceImpl<BrokerBuildingMapper, BrokerBuilding> implements IBrokerBuildingService {
    @Autowired
    BrokerBuildingMapper brokerBuildingMapper;

    @Override
    public List<BrokerBuildingWithAreaName> getBuilding(Page page, String search) {
        return brokerBuildingMapper.getBuilding(page,search);
    }

    @Override
    public List<BrokerBuildingWithAreaName> getBuildingNameAndId() {
        return brokerBuildingMapper.getBuildingNameAndId();
    }

    @Override
    public boolean add(BrokerBuildingWithAreaName brokerBuildingWithAreaName) {
        return brokerBuildingMapper.add(brokerBuildingWithAreaName);
    }

    @Override
    public boolean deleteById(Integer id) {
        return brokerBuildingMapper.deleteById(id);
    }

    @Override
    public BrokerBuilding getById(Integer id) {
        return brokerBuildingMapper.getById(id);
    }

    @Override
    public boolean update(BrokerBuilding brokerBuilding) {
        return brokerBuildingMapper.update(brokerBuilding);
    }

    @Override
    public List<SaleArea> getSaleArea() {
        return brokerBuildingMapper.getSaleArea();
    }

    @Override
    public BrokerBuildingWithAreaName getAreaId(Integer id) {
        return brokerBuildingMapper.getAreaId(id);
    }
}
